package com.angel.test.mock;

import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionContext;

import com.angel.architecture.exceptions.BusinessException;

//TODO Remove?
@SuppressWarnings("deprecation")
public class MockHttpSession implements HttpSession {
	private Map<String, Object> attrs = new HashMap<String, Object>();

	public Object getAttribute(String arg0) {
		return attrs.get(arg0);
	}

	public void setAttribute(String arg0, Object arg1) {
		attrs.put(arg0, arg1);
	}

	public void removeAttribute(String arg0) {
		attrs.remove(arg0);
	}

	// Unimplemented Methods from now on --------------------------
	public long getCreationTime() {
		throw new BusinessException("No implementado");
	}

	public String getId() {
		throw new BusinessException("No implementado");
	}

	public long getLastAccessedTime() {
		throw new BusinessException("No implementado");
	}

	public ServletContext getServletContext() {
		throw new BusinessException("No implementado");
	}

	public void setMaxInactiveInterval(int arg0) {
		throw new BusinessException("No implementado");
	}

	public int getMaxInactiveInterval() {
		throw new BusinessException("No implementado");
	}

	public HttpSessionContext getSessionContext() {
		throw new BusinessException("No implementado");
	}

	public Object getValue(String arg0) {
		throw new BusinessException("No implementado");
	}

	public Enumeration<String> getAttributeNames() {
		throw new BusinessException("No implementado");
	}

	public String[] getValueNames() {
		throw new BusinessException("No implementado");
	}

	public void putValue(String arg0, Object arg1) {
		throw new BusinessException("No implementado");
	}

	public void removeValue(String arg0) {
		throw new BusinessException("No implementado");
	}

	public void invalidate() {
		throw new BusinessException("No implementado");
	}

	public boolean isNew() {
		throw new BusinessException("No implementado");
	}

}
